﻿#ifndef _DB_IDATASETITERATOR_H
#define _DB_IDATASETITERATOR_H

#include "udatabase/interface/idataset.h"
#include "kernel/Referenced.h"
#include "udatabase/dll_cfg.h"

namespace FD
{
	namespace Utility
	{
		namespace DB
		{
			namespace Interface
			{
			/// <summary>
			/// 数据集迭代器类，用于遍历数据集。
			/// </summary>
			class FD_DB_Export IDatasetIterator : public FD::Kernel::CReferenced
			{
			public:					
				/// <summary>
				/// 默认析构函数
				/// </summary>
				/// <param name=""></param>
				/// <returns></returns>
				virtual ~IDatasetIterator();
				/// <summary>
				/// 下一个数据集对象，如果超出范围，这返回NULL
				/// </summary>
				/// <param name=""></param>
				/// <returns></returns>
				virtual FD::Utility::DB::Interface::IDataset * next();
				/// <summary>
				/// 获取迭代器中数据集的个数
				/// </summary>
				/// <param name=""></param>
				/// <returns>数据集的个数</returns>
				virtual UINT32 getSize() const;
				/// <summary>
				/// 获取迭代器中数据集的类型
				/// </summary>
				/// <param name=""></param>
				/// <returns></returns>
				virtual FD::Utility::DB::Interface::DatasetType getDatasetType() const;

			protected:
				/// <summary>
				/// 默认构造函数
				/// </summary>
				/// <param name=""></param>
				/// <returns></returns>
				IDatasetIterator();
			private:
				/// <summary>
				/// 拷贝构造函数
				/// </summary>
				/// <param name=""></param>
				/// <returns></returns>
				C_DISABLE_COPY(IDatasetIterator);
			};
		}
	}
	}
}

#endif
